package com.scommunity.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.scommunity.domain.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Mapper
@Transactional(rollbackFor = Exception.class)
public interface RoleMapper extends BaseMapper<Role> {

    List<Role> getAllByEmpId(Long empId);

    List<Role> getAll();

    @Select("select * from sc_role")
    List<Role> getAllRoles();
}
